﻿using Microsoft.Practices.Prism.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Prism.Commands;

namespace ZSens.ViewModel
{
    class ConfigButtonViewModel : NotificationObject
    {
        private System.Action _closeAction;

        public DelegateCommand UpdateLayoutCommand { get; set; }
        public DelegateCommand CancelCommand { get; set; }
        public ConfigButtonViewModel(System.Action closeAction)
        {
            this._closeAction = closeAction;
            this.UpdateLayoutCommand = new DelegateCommand(new System.Action(this.UpdateLayoutCommandExecute));
            this.CancelCommand = new DelegateCommand(new System.Action(this.CancelCommandExecute));
        }
        public void UpdateLayoutCommandExecute()
        {
            this._closeAction.Invoke();
        }
        public void CancelCommandExecute()
        {
            this._closeAction.Invoke();
        }

    }
}
